import { Column, Entity, PrimaryColumn } from 'typeorm';

@Entity({ name: 'approve_list' })
export class ApproveEntity {
    @PrimaryColumn('varchar', { name: 'id', charset: 'utf8mb4', collation: 'utf8mb4_general_ci' })
    id: string;

    // 申请id，必填
    @Column({ name: 'apply_id', type: 'varchar', charset: 'utf8mb4', collation: 'utf8mb4_general_ci'})
    applyId: string;

    // 申请设备sn，必填
    @Column({ name: 'device_sn', type: 'varchar', charset: 'utf8mb4', collation: 'utf8mb4_general_ci'})
    deviceSn: string;

    // 申请人accountId，必填
    @Column({ name: 'apply_account_id', type: 'varchar', charset: 'utf8mb4', collation: 'utf8mb4_general_ci'})
    applyAccountId: string;

    // 审批人accountId
    @Column({ name: 'approve_account_id', type: 'varchar', charset: 'utf8mb4', collation: 'utf8mb4_general_ci'})
    approveAccountId: string;

    // 审批时间
    @Column({ name: 'approve_time', type: 'varchar',  charset: 'utf8mb4', collation: 'utf8mb4_general_ci', })
    approveTime: string;

    // 审批备注
    @Column({ name: 'approve_remark', type: 'varchar', charset: 'utf8mb4', collation: 'utf8mb4_general_ci', nullable: true })
    approveRemark: string;

    // 审批状态： 审批通过1，审批拒绝2
    @Column('int', { name: 'status' })
    status: number;
}
